extends "../../../azurlane_ctrl/Siren.gd"


func _extInit():
	._extInit()
	chaName = "「塞壬」物资船"   #角色的名称
	attInfox.maxHp = 2000
	attInfox.atk = 0
	attInfox.mgiAtk = 0
	attInfox.def = 50
	attInfox.dod = 0
	attInfox.atkRan = 4
	lv = 4            #等级的设置
	atkEff = "atk_dang" #攻击时的特效
	type = sys.CharaClass.SIREN
	addSkill("开场40秒后将会脱离战斗，逃之夭夭", "逃跑")
	addSkill("被击败后，随机掉落一件装备", "战利品")
	addSkill("我方获得15%攻速与冷却加成", "激励")
	mainFlag = false
	torpFlag = false
	prefer = "t"

var index = 0
func _upS():
	._upS()
	index += 1
	if index >= 40:
		escape()

func escape():
	cflag = false
	forceHurtSelf(att.maxHp)
	
var cflag = true
func _onDeath(atkInfo):
	._onDeath(atkInfo)
	if cflag:
		sys.main.player.addItem(sys.newItem(itemData.rndGet(true)))
		cflag = false
	
func postInit():
	var p = sys.main.getStep()
	attInfox.maxHp *= (1 + p*0.01)
	attInfox.def += (p)
	attInfox.dod += (p)
	upAtt()	

func _onBattleStart():
	._onBattleStart()
	for i in getAllChas(2):
		if i.hasBuff("b_wuzichuan") != null:continue
		i.addBuff(b_wuzichuan.new())

class b_wuzichuan:
	extends "../../../azurlane_ctrl/AzurBuff.gd"
	func _init():
		attInit()
		id = "b_wuzichuan"
		att.spd = 0.15
		att.cd = 0.15
		buffName = "物资船-激励"
		dispel = 2